home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
.net (French) 1997 February
/
.net Magazine (FR) - Issue 04 - Feb 1997.iso
/
mac
/
NEWS
/
□cindymailer□
/
Voice Mail
< prev
Wrap
Text File
|
1996-05-03
|
2KB
|
77 lines
global pathName
put "Ñ Temp Sound Ñ " & the ticks into soundName
put pathName & ":Sound Cache ─:" & "Downloaded Sounds" & ":" into outFolder
if there is a folder outFolder then
fullRemove outFolder
end if
createFolder outFolder
put outFolder & soundName into outFile
open file outfile
write theArticle to file outfile
close file outfile
--break apart binhexed attachments into separate files, so
--Stuffit Expander can handle it. I don't know why it can't
--handle a bunch at once. Harumph!
put 0 into noAttachments
put 0 into char1
put empty into allFound
repeat forever
put fulloffset(return & "(This file must be converted with BinHex",temp,char1) into char1
if char1 is not 0 then
add 1 to noAttachments
put char1 & return after allFound
add 10 to char1
else
exit repeat
end if
end repeat
put bg fld "unbinhexer" into appName
if there is a file appname then
set itemDelimiter to ":"
put last item of appName into shortAppName
if noAttachments < 2 then
--0 or 1 attachments to extract
open outfile with appname
wait until the suspended is true
wait 1 second
wait until the suspended is false
else
--extract separate attachments
set itemDelimiter to ":"
put outFile into tempFile
put "ÑNewsmailer Temp FileÑ" into last item of tempFile
put 1 into firstChar
put 1 into lineNo
repeat forever
put line lineNo of allFound into temp1
if temp1 is empty then exit repeat
put line (lineNo + 1) of allFound into temp2
if temp2 is empty then
put length(temp) into temp2
else
subtract 1 from temp2
end if
put char temp1 to temp2 of temp into temp3
open file tempFile
write temp3 to file tempFile
close file tempFile
open tempFile with appName
wait until the suspended is true
wait 1 second
wait until the suspended is false
add 1 to lineNo
end repeat
fullremove tempfile
end if
put findFile(outFolder,"Ñ") into allFiles
wait 1 second
repeat with X = 1 to the number of lines in allFiles
fullRemove (line X of allFiles)
end repeat
put findFile(outFolder,"") into allFiles
repeat with X = 1 to the number of lines in allFiles
put line X of allFiles into theDoc
launchDoc theDoc
end repeat
end if